﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
	  	<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
		  <%= stylesheet_link_tag 'design' %>
		  <%= javascript_include_tag :defaults %>
		  <link rel="icon" type="image/png" href="images/vador.png" />
	      <title><%= @title %></title>
    </head>
	
	<body>

		<p style="color: green"><%= flash[:notice] %></p>
		<header>
			<% if @user %>
				<div id="header_haut">
					<div id="banniere">
	    				<div id="img_banniere">
	    					<%= image_tag("vadorsup2.png", :alt => "Vador-Supervision") %>
	    				</div>
	    				<div id="texte_banniere">
	    					<p style="text-indent: 40px;">Most powerful monitoring</p>
	    				</div>
	    			</div>
	    			
		    		<div id="panneau_identification">
		    			<p>  
							Login : <%= @user.login %> </br>
							IP : <%= @application_session.ip_address %></br>
							Dernière action : <%= date_from_db(@application_session.updated_at) %></br>
							<div style="float: right; height: 22px; vertical-align: top; line-height: 10px">
								<%= link_to image_tag("Log-Out.png", :size => "22x22"), @application_session, :method => :delete %>
								<span style="position: relative; bottom: 6px;">  <%= link_to "Logout", @application_session, :method => :delete %></span>
							</div>
						</p> 
		    		</div>
	    		</div>
	    		
				<div class="wrap">
					<ul class="menu ">
						<li><%= link_to "Monitoring", monitorings_path %></li>
						<li><%= link_to "View", views_path %></li>
						<li><%= link_to "Reporting", incidents_path %></li>
						<li><%= link_to "Administration", accounts_path %> </li>
					</ul> 
				</div> 		    
		  	<% end %>

    	</header>
    	
		<section>
		  <%= yield %>
		</section>
		<footer>Outils de supervision réalisé par Sydonie Ban et Sébastien Courtois - Projet Ruby on Rails EUROTECH 5 - Année 2011/2012</footer>
	
	</body>

</html>